//
//  LKTradeWebViewCell.m
//  Mideleague_Agent
//
//  Created by Zhiwang on 2020/6/22.
//  Copyright © 2020 Zhiwang. All rights reserved.
//

#import "LKTradeWebViewCell.h"

@interface LKTradeWebViewCell()<WKUIDelegate>
@property (weak, nonatomic) IBOutlet UILabel *headerLabel;

@end


@implementation LKTradeWebViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setUrl:(NSString *)url{
    _url = url;
    self.WKWebView = [[WKWebView alloc] init];
    [self.bgView addSubview:self.WKWebView];
    [self.WKWebView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.equalTo(self.bgView);
    }];
    NSURL *urlStr = [NSURL URLWithString:url];
    NSURLRequest *request = [NSURLRequest requestWithURL:urlStr];
    [self.WKWebView loadRequest:request];
    self.WKWebView.scrollView.scrollEnabled = NO;
    self.WKWebView.scrollView.showsVerticalScrollIndicator = NO;

}
-(void)setHeader:(NSString *)header{
    _header = header;
    self.headerLabel.text = header;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
